<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/pages/template/admin_main.xhtml">

	<ui:define name="title">
	    تكوين - الأدمن
	</ui:define>


	<div class="content">

		<ui:define name="content">

			<h:form id="f1" dir="rtl">
				<p:messages />

				<p:commandButton id="cb1" value="اضافة برنامج"
					action="#{programsAdminBean.preAddProgram}" ajax="false" />

				<div style="margin-top: 15px;"></div>

				<p:dataTable
					value="#{programsAdminBean.programsList}"
					var="program" scrollable="true" scrollHeight="150"
					>

					<p:column headerText="البرنامج" width="70%">
						<p:commandLink action="#{programsAdminBean.viewProgramDetails(program)}" value="#{program.name}"></p:commandLink> 
					</p:column>
					
					<p:column headerText="اجراءات">
						<p:commandLink value="تعديل"
							action="#{programsAdminBean.preEditProgramService(program)}"
							ajax="false" />
						<p:spacer width="20px" />
						<p:commandLink value="حذف"
							action="#{programsAdminBean.deleteProgramService(program)}"
							ajax="false" />
					</p:column>
				</p:dataTable>

			</h:form>


		</ui:define>



	</div>

</ui:composition>
</html>